import type { AppRouteRecordRaw } from "../types";

const homeRoute: AppRouteRecordRaw = {
    path: "/",
    redirect: "home",
    component: () => import("@/view/layout"),
    children: [
        {
            path: "home",
            name: "home",
            component: () => import("@/view/page/home")
        }
    ]
};

const workspaceRoute: AppRouteRecordRaw = {
    path: "/workspace",
    redirect: "/workspace/browser",
    name: "workspace",
    component: () => import("@/view/page/workspace"),
    children: [
        {
            path: "browser",
            name: "workspace-browser",
            component: () => import("@/view/page/workspace/view/ViewMapBrowser")
        }
        // {
        //     path: "editor",
        //     component: () => import("@/view/page/workspace/Map/ViewSimpleEditor.vue"),
        //     meta: {
        //         mustLogin: true
        //     }
        // },
        // {
        //     path: "dashboard",
        //     component: () => import("@/view/page/workspace/Dashboard/ViewDashboard.vue"),
        //     meta: {
        //         mustLogin: true
        //     }
        // }
    ]
};

const routers: AppRouteRecordRaw[] = [homeRoute, workspaceRoute];

export default routers;
